//
//  AboutMeWebViewController.m
//  LoveDraw
//
//  Created by 零零壹 on 2017/7/19.
//  Copyright © 2017年 梁晨. All rights reserved.
//

#import "AboutMeWebViewController.h"

@interface AboutMeWebViewController ()

@property(nonatomic,strong)UIWebView *WebV;
@end

@implementation AboutMeWebViewController

- (void)viewDidLoad {
    [super viewDidLoad];
     [self setNavgation];
    self.WebV = [[UIWebView alloc]initWithFrame:CGRectMake(0, 64, KscreenW, KscreenH-64)];
    [self.view addSubview:self.WebV];
    [self.WebV loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:[NSString stringWithFormat:@"%@%@",KUrl,self.url]]]];

}
//设置导航
-(void)setNavgation{
    UIColor *bgColor = [UIColor colorWithPatternImage: [UIImage imageNamed:@"nav_bg"]];
    UIView *navigationBar = [[UIView alloc] initWithFrame:CGRectMake(0, 0, MAIN_SCREEN_WIDTH, 64)];
    [navigationBar setBackgroundColor:bgColor];
    //左侧按钮
    UIButton *leftBtn = [[UIButton alloc]initWithFrame:CGRectMake(0, 20, 44, 44)];
    [leftBtn setBackgroundImage:[UIImage imageNamed:@"left"] forState:UIControlStateNormal];
    [leftBtn addTarget:self action:@selector(leftOnClick) forControlEvents:UIControlEventTouchUpInside];
    [navigationBar addSubview:leftBtn];

    //中间信息
    UILabel *titLabel = [[UILabel alloc]initWithFrame:CGRectMake(0, 20, MAIN_SCREEN_WIDTH, 44)];
    [titLabel setTextColor:[UIColor whiteColor]];
    [titLabel setTextAlignment:1];
    [titLabel setText:@"关于我们"];
    [navigationBar addSubview:titLabel];

    [self.view addSubview:navigationBar];
}

-(void)leftOnClick
{
    [self.navigationController popViewControllerAnimated:YES];
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
